package com.example.blogsystem.service;

import com.example.blogsystem.entity.UserInfo;
import com.example.blogsystem.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public int register(UserInfo userInfo) {
        return userMapper.register(userInfo);
    }

    public UserInfo getUserInfoByName(String username) {
        return userMapper.getUserInfoByName(username);
    }

    public String getUsername(Integer id) {
        return userMapper.getUsername(id);
    }
}
